﻿namespace NOAH.CMS.Repository
{
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    public class CourseRepository : Repository<Course>
    {
        public List<Course> GetCourseBySubject(int id)
        {
            List<Course> courses = new List<Course>();
            courses = dataContext.Courses.Where(p => p.SubjectID == id).OrderByDescending(p => p.ID).ToList();
            return courses;
        }
    }
}

